<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:p="http://primefaces.org/ui" xmlns:f="http://java.sun.com/jsf/core"
                xmlns:constants="http://www.tuanzi.com/constants/tags"
                xmlns:security="http://www.springframework.org/security/tags"
                template="/templates/template.xhtml">
    <ui:define name="title">还款提醒用户信息</ui:define>
    <ui:define name="content">
        <h:form>
            <p:defaultCommand target="search"/>
            <div class="topbar clearfix"
                 style="background: -webkit-linear-gradient(top,#f6f7f9 0,#ebedf0 100%);">
                <p:toolbar>
                    <f:facet name="left">

                        <p:columnToggler datasource="accountBillDataTable" trigger="toggler"
                                         rendered="#{security:areAllGranted('DICTIONARY_SEARCH')}"/>
                    </f:facet>
                    <f:facet name="right">
                        <p:commandButton id="search" value="查询" icon="fa fa-search"
                                         update="@form"
                                         rendered="#{accountBillListBean.isNormal() and security:areAllGranted('DICTIONARY_SEARCH')}"/>

                    </f:facet>
                </p:toolbar>
            </div>
            <div class="ui-fluid" style="padding-top: 30px;">
                <div class="ui-g">
                    <div class="ui-g-12">
                        <div class="card">
                            <h1>查询条件</h1>
                            <p:panelGrid columns="8" layout="grid"
                                         columnClasses="ui-grid-col-1,ui-grid-col-2"
                                         styleClass="ui-panelgrid-blank"
                                         style="border:0px none; background-color:transparent;">

                                <p:outputLabel for="userId" value="用户ID"/>
                                <p:inputText id="userId" value="#{accountBillListBean.$.userId}"/>
                                
                                <p:outputLabel for="loanName" value="贷款名称"/>
                                <p:inputText id="loanName" value="#{accountBillListBean.$.loanName}"/>
                                
                                <p:outputLabel for="periods" value="期数"/>
                                <p:inputText id="periods" value="#{accountBillListBean.$.periods}"/>

                                <p:outputLabel for="startAmount" value="贷款金额开始值"/>
                                <p:inputText id="startAmount" value="#{accountBillListBean.$.startAmount}"/>

                                <p:outputLabel for="endAmount" value="贷款金额结束值"/>
                                <p:inputText id="endAmount" value="#{accountBillListBean.$.endAmount}"/>

                                <p:outputLabel for="startCtime" value="添加时间开始值"/>
                                <p:inputText id="startCtime" value="#{accountBillListBean.$.startCtime}"/>
                                
                                <p:outputLabel for="endCtime" value="添加时间结束值"/>
                                <p:inputText id="endCtime" value="#{accountBillListBean.$.endCtime}"/>

                            </p:panelGrid>
                        </div>
                        <div class="card">
                            <p:dataTable id="accountBillDataTable"
                                         style="width: 100%"
                                         var="bill"
                                         value="#{accountBillListBean.lazyDataModel}"
                                         rows="#{constants:get('ROWS')}"
                                         lazy="true"
                                         paginator="true"
                                         paginatorTemplate="#{constants:get('PAGINATOR_TEMPLATE')}"
                                         rowsPerPageTemplate="#{constants:get('ROWS_PER_PAGE_TEMPLATE')}"
                                         emptyMessage="#{constants:get('EMPTY_MESSAGE')}"
                                         scrollable="true"
                                         scrollWidth="97%"
                                         reflow="true"
                                         selection="#{accountBillListBean.selectedRecords}"
                                         resizableColumns="true"
                                         rendered="#{security:areAllGranted('DICTIONARY_SEARCH')}">

                                <p:column headerText="用户ID">
                                    <h:outputText value="#{bill.userId}"/>
                                </p:column>
                                
                                <p:column headerText="添加时间">
                                    <h:outputText value="#{bill.ctime}"/>
                                </p:column>
                                
                                <p:column headerText="贷款名称">
                                    <h:outputText value="#{bill.loanName}"/>
                                </p:column>
                                
                                <p:column headerText="贷款金额">
                                    <h:outputText value="#{bill.amount}"/>
                                </p:column>
                                
                                <p:column headerText="利率">
                                    <h:outputText value="#{bill.interestTateType}"/>
                                </p:column>
                                
                                <p:column headerText="手续费">
                                    <h:outputText value="#{bill.fee}"/>
                                </p:column>
                                
                                <p:column headerText="期数">
                                    <h:outputText value="#{bill.periods}"/>
                                </p:column>
                                
                                <p:column headerText="还款周期">
                                    <h:outputText value="#{bill.repaymentCycle}"/>
                                </p:column>
                                
                                <p:column headerText="首次还款日">
                                    <h:outputText value="#{bill.repaymentDate}"/>
                                </p:column>
                                
                            </p:dataTable>
                        </div>
                    </div>
                </div>
            </div>
        </h:form>
    </ui:define>
</ui:composition>
